﻿using System;
using System.Collections.Generic;
using SAFPodcast.WP8.DTO.Entities;
using SAFPodcast.WP8.DTO.TO;

namespace SAFPodcast.WP8.Model.Services
{
    public interface IDataService
    {
        void InitializeDB();
        void InitializeErrorManagement();

        void DownloadPodcast(Uri uri, Action<DownloadDataItem, Exception> callback);
        Feed AddFeed(String uriAsString, String name);
        void DeleteFeed(Feed feed);
        void TestFeed(Uri uri, Action<bool> callback);
        Feed UpdateFeed(Feed selectedFeed, string urlAsString, string name);
        void LoadAndParseFeed(Feed feed, Action<List<FeedItem>, Exception> onSuccess);
        void GetFeedName(Uri uri, Action<String, Exception> callback);
        void ParseAsync(String xml, Action<List<FeedItem>> callback);
        void DownloadFeedItem(FeedItem feedItem, Action<DownloadFeedItemDataItem, Exception> callback);
        void GetFeeds(Action<FeedListDataItem, Exception> callback);
        void SendErrors();
        void EmptyReceptionDir();
    }
}
